require 'rubygems'
require 'mechanize'

agent =Mechanize.new
page = agent.get('http://sina.com/')

page.links.each do |link| puts link.text end
